var status = 0;  

function start() {  
    status = -1;  
    action(1, 0, 0);  
}  

function action(mode, type, selection) {  
              
    if (mode == -1) {//ExitChat  
        cm.dispose();
    }  
      
    else if (mode == 0){//No  
        cm.sendOk("leave me alone then..");  
        cm.dispose();
    }  
      
    else{            //Regular Talk  
       
        if (mode == 1)  
            status++;  
        else  
            status--;  
       
        if (status == 0) {//First talk  
            cm.sendYesNo("Wanna rebirth? (the max level is 250!)");  
        }   
        else if (status == 1) { //checks level and gives yes/no   
            if (cm.getChar().getLevel() < 200){  
                cm.sendOk("You arent level 200 or higher..");  
                cm.dispose();  
            }  
            else {//gives item list and does next  
                cm.sendYesNo("#rare you sure? o.o#k");  
            }          
    } else if (status == 2) {  
       wui = 1;  
        var statup = new java.util.ArrayList();  
        var p = cm.c.getPlayer();  
        cm.getChar().setLevel(2);  
        cm.changeJob(net.sf.odinms.client.MapleJob.BEGINNER);  
        cm.sendOk("ok..!");  
                statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LEVEL, java.lang.Integer.valueOf(1)));  
        p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));  
	cm.getChar().setExp(0);
        cm.dispose();  
    }              
}  
}